package com.example.redis;

import com.example.redis.autoregister.config.RedisSerializerBuilderConfig;
import com.example.redis.autoregister.support.BeanCacheKeyRedisSerializerFactory;
import com.example.redis.autoregister.support.Jackson2JsonRedisSerializerFactory;
import com.example.redis.autoregister.config.RedisTemplateConfig;

import java.lang.annotation.*;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
// 添加 RedisTemplateConfig 注解
@RedisTemplateConfig(
        keySerializer = @RedisSerializerBuilderConfig(builder = BeanCacheKeyRedisSerializerFactory.class) ,
        valueSerializer =  @RedisSerializerBuilderConfig(builder = Jackson2JsonRedisSerializerFactory.class))
public @interface RedisBeanCache {
}
